package com.chance.cc.crawler.development.command.publish.acfun;

import com.chance.cc.crawler.core.CrawlerJob;
import com.chance.cc.crawler.development.command.job.domain.acfun.AcfunRealtimeCrawlerSchedulerJob;
import com.chance.cc.crawler.development.command.job.domain.acfun.AcfunTraceCrawlerSchedulerJob;
import com.chance.cc.crawler.development.command.script.acfun.AcfunCrawlerScript;
import com.chance.cc.crawler.development.command.trigger.domain.acfun.AcfunCrawlerTriggerInfo;

/**
 * @Author Zhao.Hhuan
 * @Date Create in 2021/3/3 12:58
 * @Description
 *      acfun 发布任务
 **/
public class AcfunCrawlerJob {
    private static final String domain = "acfun";

    public static void main(String[] args) {
//        publishSearchKwSimpleJob();

        publishSearchKwRealtimeCronJob();
        publishSearchKwTraceCronJob();
        AcfunCrawlerScript.publishCrawlerNodeScript();
    }
    
    public static void publishSearchKwSimpleJob(){
        String node = "acfun关键词采集";
        CrawlerJob crawlerJob = AcfunRealtimeCrawlerSchedulerJob.publishCrawlerScheduleJobInfo();
        AcfunCrawlerTriggerInfo.simpleCrawlerScheduleTriggerInfo(crawlerJob.generateCrawlerKey(),crawlerJob.generateCrawlerTriggerKey(),domain,node);
    }
    
    public static void publishSearchKwRealtimeCronJob(){
        String node = "acfun关键词采集";
        CrawlerJob crawlerJob = AcfunRealtimeCrawlerSchedulerJob.publishCrawlerScheduleJobInfo();
        AcfunCrawlerTriggerInfo.realtimeCrawlerScheduleTriggerInfo(crawlerJob.generateCrawlerKey(),crawlerJob.generateCrawlerTriggerKey(),domain,node);
    }

  
    public static void publishSearchKwTraceCronJob(){
        String node = "acfun关键词采集";
        CrawlerJob crawlerJob = AcfunTraceCrawlerSchedulerJob.publishCrawlerScheduleJobInfo();
        AcfunCrawlerTriggerInfo.traceCrawlerScheduleTriggerInfo(crawlerJob.generateCrawlerKey(),crawlerJob.generateCrawlerTriggerKey(),domain,node);
    }

    
}
